/**
 * 
 */
package com.dalonedrow.rpg.base.flyweights;

/**
 * 
 * @author Donald
 *
 * @param <IO>
 * @param <SLOT>
 */
public class InventoryData<IO, SLOT> {
	private IO		io;
	/** the number of inventory slots. */
	private int		numInventorySlots;
	/** the inventory slots. */
	private SLOT[]	slots;
	/**
	 * Gets the io
	 * @return {@link IO}
	 */
	public final IO getIo() {
		return io;
	}
	/**
	 * Gets the number of inventory slots.
	 * @return <code>int</code>
	 */
	public final int getNumInventorySlots() {
		return numInventorySlots;
	}
	/**
	 * Gets the inventory slot at the specific index.
	 * @param index the slot index
	 * @return {@link SLOT}
	 */
	public final SLOT getSlot(final int index) {
		return slots[index];
	}
	/**
	 * Sets the io
	 * @param io the io to set
	 */
	public final void setIo(final IO io) {
		this.io = io;
	}
	/**
	 * Sets the inventory slots.
	 * @param val the inventory slots
	 */
	protected final void setSlots(final SLOT[] val) {
		slots = val;
		numInventorySlots = slots.length;
	}
}
